var pageParam = {};

$(function() {
	$('#vue_vm_list div').hide();
});

function findElder() {
	if($('#vue_vm_list').length==0) {return;}
	$('#vue_vm_list div').hide();
	var searchVal = $('#searchVal').val();
	
	find_basic(path+'/beHospitalFees/findElderInfo', searchVal, function(response) {
		$('#vue_vm_list').html(gl_vue_vm_list_html);
		
		if(response.data.length>0) {
			pageParam.elderId = response.data[0].elder.elderId;
			pageParam.elderName = response.data[0].elder.name;
			pageParam.buildingId = response.data[0].building.buildingId;
			pageParam.buildingName = response.data[0].building.buildingName;
			pageParam.floorId = response.data[0].floor.floorId;
			pageParam.floorName = response.data[0].floor.floorName;
			pageParam.roomNumber = response.data[0].room.roomNumber;
			pageParam.bedNumber = response.data[0].bed.bedNumber;
			pageParam.remindStatus = response.data[0].elderWalletForm.beStatus;
			pageParam.walletBalance = response.data[0].elderWalletForm.walletBalance;
		}
		
		
		new Vue({
			el: '#vue_vm_list',
			data: {
				todos: response.data
			}
		});
		
		$('#vue_vm_list div').show();
	});
}

function deleteBatch() {
	deleteBatch_basic(path+'/elder/deleteBatch');
}
